<!-- views/components/element/FrameElement/BaseFrameElement.vue -->

<template>
  <div class="base-element-frame"
    :style="{
      top: elementInfo.top + 'px',
      left: elementInfo.left + 'px',
      width: elementInfo.width + 'px',
      height: elementInfo.height + 'px',
    }"
  >
    <div
      class="rotate-wrapper"
      :style="{ transform: `rotate(${elementInfo.rotate}deg)` }"
    >
      <div class="element-content">
    
        <el-carousel :height="elementInfo.height+'px'">
      <el-carousel-item v-for="item in elementInfo.urls" :key="item">
        <img style="width: 100%;  height: 100%;" draggable="false" :src="item" alt="">
      </el-carousel-item>
    </el-carousel>

        <div class="mask"></div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { PropType } from 'vue'
import { PPTImagelunboElement } from '@/types/slides'

const props = defineProps({
  elementInfo: {
    type: Object as PropType<PPTImagelunboElement>,
    required: true,
  },
})
</script>

<style lang="scss" scoped>
.base-element-frame {
  position: absolute;
}
.element-content {
  width: 100%;
  height: 100%;
}
.mask {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}
</style>